﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using GemBlaster.UI;

namespace GemBlaster.Mechanics
{
    public class InfoView: IUiView
    {
        IGameController Controller = null;
        GameInstructions Instructions = null;

        public void Init(IGameController controller)
        {
            Controller = controller;
        }

        public void Activate()
        {
            if (Instructions == null)
            {
                Instructions = new GameInstructions();
                Instructions.ReturnLinkClick += delegate(object clickSender, EventArgs clickArgs)
                {
                    Controller.CurrentView = UiViewType.Introduction;
                };
            }
            Controller.AddVisual(Instructions);
        }

        public void Deactivate()
        {
            Controller.RemoveVisual(Instructions);
        }
    }
}
